from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
    def sou(self):
        loc = (By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜商品名称 作者 出版社 ISBN")')
        ele = self.find_ele(loc)
        return ele
    def shu(self):
        loc = (By.CLASS_NAME,'android.widget.EditText')
        ele = self.find_ele(loc)
        return ele
    def suo(self):
        loc = (By.ID,'com.kongfz.app:id/tvSearch')
        ele = self.find_ele(loc)
        return ele
    def duan(self):
        #水浒传页面断言
        loc = (By.XPATH,'//android.widget.TextView[@text="查看全部"]')
        ele = self.find_ele(loc)
        return ele
    def duan1(self):
        #红楼梦页面断言
        loc = (By.ID,'com.kongfz.app:id/tvHitLeft')
        ele = self.find_ele(loc)
        return ele